<template>
    <div>
      <h1>上传GIt</h1>
        <h1>Login</h1>
        <table>
            <tbody>
                <tr>
                    <td>Username</td>
                    <td><input type="text" v-model="info.name"></td>
                </tr>
                <tr>
                    <td>Password</td>
                    <td><input type="password" v-model="info.pwd"></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <button @click="addlogin">Login</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue';
import axios from 'axios';
import moment from 'moment';
import { useRouter, useRoute } from 'vue-router';

const router = useRouter();
const route = useRoute();

let info:any = reactive({
   name: '',
   pwd: ''

  
});
const addlogin=()=>{
  axios({
    url:"/api/Login/ALogin",
    method:"get",
    params:info,
  }) 
  .then((res)=>{
    if(res.data=res){
     alert("登录成功"); 
    }
    else{
      alert("登录失败"); 
    }
    console.log(res); 
  })
}

</script>

<style scoped>

</style>